package com.interview.ujiuye1;

/**
 * Copyright (C), 2018-2020
 * FileName: AAA
 * Author:   kongfanyu
 * Date:     2020/12/8 10:23
 */
public class AAA {
    public static void main(String[] args) {
        String str = "abc";
        char[] strToChar = str.toCharArray(); // 先把它他变为字符数组

        // 然后通过 Integer 中的 toBinaryString 方法来一个一个转
        for ( int i = 0; i < strToChar.length; i++ ) {
            String binStr = Integer.toBinaryString( strToChar[i] );
            System.out.print( binStr + "\t");
        }

    }
}
